Xbasic

DDE.CLOSE Function

Syntax

V Close()

Description

The <DDE>.CLOSE() method closes the DDE channel referenced by the pointer, <DDE>. Once a channel is closed, subsequent DDE functions must be preceded by the DDE.OPEN() method which establishes a new (different) channel.

Example

This script executes commands in Microsoft Word which will insert the customer's full name into a document.

dim first_name as C = "John"
dim last_name as C = "Citizen"
dim text_data as C
text_data = "Dear John..."
sys_shell("C:\Program Files\Microsoft Office\Office10\WINWORD.EXE")
dde_session = dde.open("winword", "system")
dde_session.execute("[appmaximize]")
text_data = "Dear " + first_name - " " + last_name
dde_session.close()

See Also